import 'package:flutter/material.dart';

class SingleContainer extends StatelessWidget {
  const SingleContainer({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("Container 使用"),
        centerTitle: true,
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
      ),
      body: Container(
        margin: const EdgeInsets.only(top: 60.0,left: 80.0),
        constraints: const BoxConstraints.tightFor(width: 400.0,height: 150.0),
        decoration: BoxDecoration(
          border: Border.all(width: 3,color: const Color(0xffaaaaaa)),
          boxShadow: const [
            BoxShadow(
              color: Colors.black54,
              offset: Offset(2.0,2.0),
              blurRadius: 10.0
            )
          ],
          gradient: const LinearGradient(
            colors: [Colors.red,Colors.blue,Colors.yellow]
          )
        ),
        transform: Matrix4.rotationZ(.3),
        alignment: Alignment.center,
        child: const Text(
            "容器",
            style: TextStyle(color: Colors.white,fontSize: 30.0),
        ),
      )
    );
  }

}